//package my.study.org.springframework.aop.examples.example1;
//
//import org.springframework.context.ApplicationContext;
//import org.springframework.context.support.ClassPathXmlApplicationContext;
//
//public class Main {
//
//	private static ApplicationContext context = new ClassPathXmlApplicationContext(
//			"my/study/org/springframework/aop/examples/example1/config.xml");
//
//	/**
//	 * 
//	 * 
//	 * @param args
//	 * @throws PerformanceException 
//	 */
//	public static void main(String[] args) throws PerformanceException {
//		run1();
//		run2();
//		run3();
//	}
//
//	/**
//	 * 在Performer中注入一个Audience，由Performer来管理Audiencet的行为，Bad Design
//	 * @throws PerformanceException
//	 */
//	public static void run1() throws PerformanceException {
//		System.out.println("Main.run1()");
//		Performer performer = (Performer) context.getBean("instrumentalist1");
//		performer.perform();
//		System.out.println();
//	}
//	/**
//	 * 将Audience作为一个切面，编写AudienceAdvice (implements MethodBeforeAdvice, AfterReturningAdvice, ThrowsAdvice)
//	 * 
//	 * @throws PerformanceException
//	 */
//	public static void run2() throws PerformanceException {
//		System.out.println("Main.run2()");
//		Performer performer = (Performer) context.getBean("instrumentalist2");
//		performer.perform();
//		System.out.println();
//	}
//	/**
//	 * 将Audience作为一个切面，编写周围通知AudienceAroundAdvice (implements MethodInterceptor)
//	 * 
//	 * @throws PerformanceException
//	 */
//	public static void run3() throws PerformanceException {
//		System.out.println("Main.run3()");
//		Performer performer = (Performer) context.getBean("instrumentalist3");
//		performer.perform();
//		System.out.println();
//	}
//}
